All Questions
383 questions
0votes
0answers
70views
`$SHELL` still points to `/bin/sh` over SSH after `chsh -s $(which fish)`
I am using OpenBSD-current. After doas pkg_add fish, I ran chsh -s $(which fish) to change the default shell of my user qys to fish, and it works: $ /usr/bin/ssh magicbane Last login: Wed Aug 21 11:17:...
1vote
2answers
393views
SSH shows double shell prompt after entering a command
As you can see in the example below, the shell prompt is duplicated after I use a command. I tried changing the PS1 to something simpler, but the same issue continues to occur: PS1="\u@\h:\W\$ &...
0votes
1answer
291views
Saving ZSH history across SSH sessions [duplicate]
Is it possible to keep zsh history consistent across SSH sessions to the same machine? To explain further, let's say I opened an SSH session to another computer, ran mkdir test-dir/, and exited the ...
1vote
1answer
102views
How to display text for non-interactive login shell
What I need: I am trying to change /etc/bashrc in such a way that shell could display specific text when the following ssh command is entered ssh user@ip "whoami" But I don't understand ...
0votes
1answer
149views
How can root get access to SSH_TTY
I think that SSH_TTY is an environment variable set by ssh that holds the device node of the current virtual terminal; e.g. /dev/pts/0, /dev/pts/1 , etc. I know that when I'm logged in to an SSH ...
1vote
2answers
165views
Multiple ssh sessions with different users
I am writing a script that connects to multiple servers which uses 3 different users. #!/bin/ksh server1=("abc1" "abc2") server2=("abc3" "abc4") server3=("...
-1votes
2answers
81views
ssh command just exits the sesssion
I have this: ssh -i "alex-kp.pem" '[email protected]' ' cd codes/vbe eval $(ssh-agent) ssh-add -D ssh-add ~/.ssh/id_vbe ' it executes the commands ...
4votes
3answers
552views
Two ssh output as awk input
I have two remote servers that I am trying to ssh and cat some files.. I want to input the output of the ssh to a awk command. This is what I have got ssh username@host1 “cat /tmp/test/*” ssh ...
0votes
1answer
104views
Upload a file with SSH and then give back the control to the user
I'm trying to create a script that, when you connect on a remote server with SSH, the script checks things and deploy your personals scripts before giving you back the stdin, all in one SSH connection ...
7votes
5answers
2kviews
For loop through servers with custom ports (for i in "user1@server1 -p 12345" "user2@server2 -p 54321" ...; do)
I'm trying to run a command on a series of servers via ssh. I have recently changed ssh ports to avoid Internet scanners, but it broke my script. Does anyone know "an easy way" to specify ...
15votes
1answer
1kviews
Running GNU screen through SSH, the shell is not a login shell?
I'm using screen (the problematically named terminal session manager) on a remote system accessed over SSH - to run long running processes and such. I have eventually started using a command to attach ...
3votes
1answer
153views
How to ensure that SSH client leave stdout file descriptor clean for reuse?
This code terminates with error : ( ssh localhost seq 100000 seq 100000 ) | wc #-> seq: write error: Resource temporarily unavailable This is a minimal code to reproduce the write error. ...
0votes
1answer
198views
How to interrupt a running command in linux and continue from the last state later?
I run a sh script on terminal of linux remote server using ssh which will take very long. I need to power off my machine and I want to save the current state of execution and continue later from the ...
2votes
2answers
587views
Replace $'\374', $'\344' and more with appropriate umlauts
after 2 days of research, I must ask the pros over here. I had set up a NFS-share on my first Debian server at home. I copied over a few files from a windows 11 machine and now all the umlauts are ...
0votes
1answer
337views
How to use alias command with a paramiko SSHClient connection?
I am trying to execute the following, with no success getting either the 'py3start' or the 'py3test' alias commands recognized - (I introduced the 'py3test' for testing purposes to check if setting ...